import { http } from '@/utils/http'
import { post } from '@/utils/http'

// 数据汇总
export const briefReportlist = (data: Object) => {
  return http({
    method: 'POST',
    url: '/V5/revenueSummary/briefReport',
    data,
  })
}

// 收益趋势图
export const incomeStatistics = (data: Object) => {
  return http({
    method: 'POST',
    url: '/V5/revenueSummary/incomeStatistics',
    data,
  })
}

// 门店收益汇总图
export const siteIncome = (data: Object) => {
  return http({
    method: 'POST',
    url: '/V5/revenueSummary/siteIncome',
    data,
  })
}

// 获取所有自定义费项
export const getAllCustomItem = (data: Object) => {
  return http({
    method: 'POST',
    url: '/V5/tenantCostTemplate/queryAllCustomItem',
    data,
  })
}

// 总支出统计
export const expensesStatistics = (data: Object) => {
  return http({
    method: 'POST',
    url: '/V5/revenueSummary/expensesStatistics',
    data,
  })
}

// 总收入汇总
export const revenueStatistics = (data: Object) => {
  return http({
    method: 'POST',
    url: '/V5/revenueSummary/revenueStatistics',
    data,
  })
}

// 订单统计
export const orderStatistics = (data: Object) => {
  return http({
    method: 'POST',
    url: '/V5/revenueSummary/orderStatistics',
    data,
  })
}

// 获取配置的详情
export const tenantCostConfig = (data: Object) => {
  return http({
    method: 'POST',
    url: '/V5/tenantCostConfig/selectByType',
    data,
  })
}

// 保险/车损/油电费配置
export const tenantCostConfigSave = (data: Object) => {
  return http({
    method: 'POST',
    url: '/V5/tenantCostConfig/save',
    data,
  })
}

// 自驾短租收益趋势
export const shortOrderProfitStatistics = (data: Object) => {
  return http({
    method: 'POST',
    url: '/V5/revenueSummary/shortOrderProfitStatistics',
    data,
  })
}

// 根据费用生成时间或结算时间统计订单费用
export const shortOrderFeeProfitStatistics = (data: Object) => {
  return http({
    method: 'POST',
    url: '/V5/revenueSummary/shortOrderFeeProfitStatistics',
    data,
  })
}
